3.136 \(\int x^2 (a+b \tanh ^{-1}(\frac{c}{x})) \, dx\)

Optimal. Leaf size=45 \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{6} b c^3 \log \left (c^2-x^2\right )+\frac{1}{6} b c x^2 \]

[Out]

(b*c*x^2)/6 + (x^3*(a + b*ArcTanh[c/x]))/3 + (b*c^3*Log[c^2 - x^2])/6

________________________________________________________________________________________

Rubi [A]  time = 0.0327064, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {6097, 263, 266, 43} \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{6} b c^3 \log \left (c^2-x^2\right )+\frac{1}{6} b c x^2 \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c*x^2)/6 + (x^3*(a + b*ArcTanh[c/x]))/3 + (b*c^3*Log[c^2 - x^2])/6

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right ) \, dx &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{3} (b c) \int \frac{x}{1-\frac{c^2}{x^2}} \, dx\\ &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{3} (b c) \int \frac{x^3}{-c^2+x^2} \, dx\\ &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{6} (b c) \operatorname{Subst}\left (\int \frac{x}{-c^2+x} \, dx,x,x^2\right )\\ &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{6} (b c) \operatorname{Subst}\left (\int \left (1-\frac{c^2}{c^2-x}\right ) \, dx,x,x^2\right )\\ &=\frac{1}{6} b c x^2+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{6} b c^3 \log \left (c^2-x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0079073, size = 50, normalized size = 1.11 \[ \frac{a x^3}{3}+\frac{1}{6} b c^3 \log \left (x^2-c^2\right )+\frac{1}{6} b c x^2+\frac{1}{3} b x^3 \tanh ^{-1}\left (\frac{c}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c*x^2)/6 + (a*x^3)/3 + (b*x^3*ArcTanh[c/x])/3 + (b*c^3*Log[-c^2 + x^2])/6

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 67, normalized size = 1.5 \begin{align*}{\frac{{x}^{3}a}{3}}+{\frac{b{x}^{3}}{3}{\it Artanh} \left ({\frac{c}{x}} \right ) }+{\frac{{c}^{3}b}{6}\ln \left ({\frac{c}{x}}-1 \right ) }+{\frac{bc{x}^{2}}{6}}-{\frac{{c}^{3}b}{3}\ln \left ({\frac{c}{x}} \right ) }+{\frac{{c}^{3}b}{6}\ln \left ( 1+{\frac{c}{x}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c/x)),x)

[Out]

1/3*x^3*a+1/3*b*x^3*arctanh(c/x)+1/6*c^3*b*ln(c/x-1)+1/6*b*c*x^2-1/3*c^3*b*ln(c/x)+1/6*c^3*b*ln(1+c/x)

________________________________________________________________________________________

Maxima [A]  time = 0.961072, size = 57, normalized size = 1.27 \begin{align*} \frac{1}{3} \, a x^{3} + \frac{1}{6} \,{\left (2 \, x^{3} \operatorname{artanh}\left (\frac{c}{x}\right ) +{\left (c^{2} \log \left (-c^{2} + x^{2}\right ) + x^{2}\right )} c\right )} b \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*x^3*arctanh(c/x) + (c^2*log(-c^2 + x^2) + x^2)*c)*b

________________________________________________________________________________________

Fricas [A]  time = 1.76935, size = 117, normalized size = 2.6 \begin{align*} \frac{1}{6} \, b c^{3} \log \left (-c^{2} + x^{2}\right ) + \frac{1}{6} \, b x^{3} \log \left (-\frac{c + x}{c - x}\right ) + \frac{1}{6} \, b c x^{2} + \frac{1}{3} \, a x^{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x)),x, algorithm="fricas")

[Out]

1/6*b*c^3*log(-c^2 + x^2) + 1/6*b*x^3*log(-(c + x)/(c - x)) + 1/6*b*c*x^2 + 1/3*a*x^3

________________________________________________________________________________________

Sympy [A]  time = 1.10867, size = 49, normalized size = 1.09 \begin{align*} \frac{a x^{3}}{3} + \frac{b c^{3} \log{\left (- c + x \right )}}{3} + \frac{b c^{3} \operatorname{atanh}{\left (\frac{c}{x} \right )}}{3} + \frac{b c x^{2}}{6} + \frac{b x^{3} \operatorname{atanh}{\left (\frac{c}{x} \right )}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c/x)),x)

[Out]

a*x**3/3 + b*c**3*log(-c + x)/3 + b*c**3*atanh(c/x)/3 + b*c*x**2/6 + b*x**3*atanh(c/x)/3

________________________________________________________________________________________

Giac [A]  time = 1.1681, size = 66, normalized size = 1.47 \begin{align*} \frac{1}{6} \, b c^{3} \log \left (-c^{2} + x^{2}\right ) + \frac{1}{6} \, b x^{3} \log \left (-\frac{c + x}{c - x}\right ) + \frac{1}{6} \, b c x^{2} + \frac{1}{3} \, a x^{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x)),x, algorithm="giac")

[Out]

1/6*b*c^3*log(-c^2 + x^2) + 1/6*b*x^3*log(-(c + x)/(c - x)) + 1/6*b*c*x^2 + 1/3*a*x^3